<template>
  <div class="s-sbd">

    <el-container style="height: 97vh; border: 1px solid #eee;">
      <!--      左侧导航栏-->
      <el-aside >
        <el-menu @select="handleMenuSelect" >
          <el-submenu index="1">
            <template slot="title"><i class="el-icon-s-order"></i>信息管理</template>
            <el-menu-item index="1-1">权限管理</el-menu-item>
            <el-menu-item index="1-2">项目管理</el-menu-item>
            <el-menu-item index="1-3">项目展示</el-menu-item>
            <el-menu-item index="1-4">塔机信息</el-menu-item>
            <el-menu-item index="1-5">异常报警</el-menu-item>
          </el-submenu>

          <el-submenu index="2">
            <template slot="title"><i class="el-icon-menu"></i>在线建模</template>
            <el-menu-item index="2-1">新建项目</el-menu-item>
            <el-menu-item index="2-2">模板管理</el-menu-item>
          </el-submenu>

        </el-menu>
      </el-aside>

      <el-main style="padding: 0;margin: 0">
        <div style="width: 100%">
          <navigation/>
        </div>
        <div style="width: 100%">

          <!--      下面是每个栏目在右侧显示的内容-->

          <!--工地信息管理-->
          <div v-if="this.$store.state.selectedMenu === '1-1'">
            <limit/>
          </div>

          <div v-else-if="this.$store.state.selectedMenu === '1-2'">
            <p_limit/>
          </div>

          <div v-else-if="this.$store.state.selectedMenu === '1-3'">
            <project_show/>
          </div>

          <div v-else-if="this.$store.state.selectedMenu === '1-4'">
            <tower-craneshow/>
          </div>

          <div v-else-if="this.$store.state.selectedMenu === '1-5'">

          </div>

          <!--在线建模-->
          <div v-else-if="this.$store.state.selectedMenu === '2-1'">
            <new-project/>
          </div>

          <div v-else-if="this.$store.state.selectedMenu === '2-2'">
            <module/>
          </div>

          <div v-else>
            这里是首页
          </div>

        </div>
      </el-main>








    </el-container>


  </div>
</template>

<script>
import Navigation from "@/components/common/navigation";
import Limit from "@/components/index/limit";
import NewProject from "@/components/modeling/newProject.vue";
import Module from "@/components/modeling/Module management.vue";
import Project_show from "@/components/index/project_show";
import TowerCraneshow from "@/components/index/towerCraneshow";
import P_limit from "@/components/index/p_limit";

export default {
  name: "hello",
  components: {P_limit, TowerCraneshow, Project_show, Module,NewProject, Limit, Navigation},
  data() {
    return {

    };
  },
  methods: {
    handleMenuSelect(index) {
      this.$store.state.selectedMenu = index
    },
  },
  mounted() {

  },

};
</script>
